package ar.uba.dc.tl.mylanga.symbol;

import ar.uba.dc.tl.mylanga.type.Type;

public class SymbolTableEntry {

	private Type type;
	private Symbol symbol;

	public SymbolTableEntry(Symbol symbol) {
		assert symbol != null;

		this.initialize(symbol, null);
	}

	public SymbolTableEntry(Symbol symbol, Type type) {
		assert type != null;
		assert symbol != null;

		this.initialize(symbol, type);
	}

	private void initialize(Symbol symbol, Type type) {
		this.type = type;
		this.symbol = symbol;
	}

	public Symbol getSymbol() {
		return this.symbol;
	}

	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		assert type != null;

		this.type = type;
	}
}
